@import "../../styles/colors";

.cm-date-picker-header{
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-bottom: 1px solid @color-divider;
}
.cm-date-picker-prev-year{
    margin-left: 10px;
}
.cm-date-picker-prev-year,
.cm-date-picker-prev-month{
    float: left;
}
.cm-date-picker-next-year{
    margin-right: 10px;
}
.cm-date-picker-next-year,
.cm-date-picker-next-month{
    float: right;
}
.cm-date-picker-header-btn{
    display: inline-block;
    width: 20px;
    height: 24px;
    line-height: 26px;
    margin-top: 2px;
    text-align: center;
    cursor: pointer;
    color: @color-disabled;
    transition: color .2s ease-in-out;
    &:hover{
        color: @color-blue;
    }
}

.cm-date-picker-header-month,
.cm-date-picker-header-year{
    cursor: pointer;
    padding: 0 2px;
    user-select: none;
    &:hover{
        color: @color-blue;
    }
}

.cm-date-picker-body{
    padding: 10px;
    width: 216px;
    white-space: normal;
}
.cm-date-picker-week-line{
    span{
        display: inline-block;
        width: 24px;
        height: 24px;
        line-height: 24px;
        text-align: center;
        margin: 2px;
        color: @color-disabled;
    }
}
.cm-date-picker-month,
.cm-date-picker-year,
.cm-date-picker-date{
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    margin: 2px 0;
    text-align: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    &:before{
        content: '';
        position: absolute;
        display: block;
        left: 2px;
        right: 2px;
        top: 2px;
        bottom: 2px;
        border-radius: 3px;
    }
    &:hover:before{
        background-color: #e1f0fe;
    }
    em{
        position: relative;
        z-index: 1;
        display: inline-block;
        font-style: normal;
    }
}
.cm-date-picker-month,
.cm-date-picker-year{
    width: 40px;
    margin: 10px 12px;
    border-radius: 3px;
    em{
        width: 40px;
    }
}

.cm-date-picker-active{
    color: #fff;
    &:hover:before,
    &:before{
        background-color: @color-blue;
    }
}
.cm-date-picker-today {
    &:after{
        content: '';
        position: absolute;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        top: 2px;
        right: 2px;
        background-color: @color-blue-light;
    }
}

.cm-date-picker-disabled{
    color: @color-disabled;
    cursor: default;
    pointer-events: none;
    &:hover{
        &:before{
            content: none;
        }
    }
}
.cm-date-picker-inhover{
    &:before{
        left: 0;
        right: 0;
        background-color: #e1f0fe;
        border-radius: 0;
    }
}
.cm-date-picker-inrange{
    &:hover:before{
        background-color: @color-blue-light;
    }
    &:before{
        left: 0;
        right: 0;
        background-color: @color-blue-light;
        border-radius: 0;
    }
    em{
        color: #fff;
    }
    &.cm-date-picker-last-range:before{
        border-radius: 0 3px 3px 0;
    }
    &.cm-date-picker-first-range:before{
        border-radius: 3px 0 0 3px;
    }
}

.cm-date-picker-empty{
    pointer-events: none;
}